import 'package:gun/generated/json/base/json_convert_content.dart';
import 'package:gun/entity/setting_entity.dart';

SettingEntity $SettingEntityFromJson(Map<String, dynamic> json) {
	final SettingEntity settingEntity = SettingEntity();
	final String? apiAddr = jsonConvert.convert<String>(json['api_addr']);
	if (apiAddr != null) {
		settingEntity.apiAddr = apiAddr;
	}
	final String? sip2ApiAddr = jsonConvert.convert<String>(json['sip2_api_addr']);
	if (sip2ApiAddr != null) {
		settingEntity.sip2ApiAddr = sip2ApiAddr;
	}
	final String? username = jsonConvert.convert<String>(json['username']);
	if (username != null) {
		settingEntity.username = username;
	}
	final String? psw = jsonConvert.convert<String>(json['psw']);
	if (psw != null) {
		settingEntity.psw = psw;
	}
	final String? analysisBook = jsonConvert.convert<String>(json['analysisBook']);
	if (analysisBook != null) {
		settingEntity.analysisBook = analysisBook;
	}
	final bool? rememberPaw = jsonConvert.convert<bool>(json['rememberPaw']);
	if (rememberPaw != null) {
		settingEntity.rememberPaw = rememberPaw;
	}
	final int? power = jsonConvert.convert<int>(json['power']);
	if (power != null) {
		settingEntity.power = power;
	}
	final int? distance = jsonConvert.convert<int>(json['distance']);
	if (distance != null) {
		settingEntity.distance = distance;
	}
	final int? keycode = jsonConvert.convert<int>(json['keycode']);
	if (keycode != null) {
		settingEntity.keycode = keycode;
	}
	final String? deviceNo = jsonConvert.convert<String>(json['device_no']);
	if (deviceNo != null) {
		settingEntity.deviceNo = deviceNo;
	}
	final String? deviceName = jsonConvert.convert<String>(json['deviceName']);
	if (deviceName != null) {
		settingEntity.deviceName = deviceName;
	}
	return settingEntity;
}

Map<String, dynamic> $SettingEntityToJson(SettingEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['api_addr'] = entity.apiAddr;
	data['sip2_api_addr'] = entity.sip2ApiAddr;
	data['analysisBook'] = entity.analysisBook;
	data['username'] = entity.username;
	data['psw'] = entity.psw;
	data['rememberPaw'] = entity.rememberPaw;
	data['power'] = entity.power;
	data['keycode'] = entity.keycode;
	data['device_no'] = entity.deviceNo;
	data['distance'] = entity.distance;
	data['deviceName'] = entity.deviceName;
	return data;
}